<template>
    <div class="use">
        <div class="logo"><img src="" alt=""></div>
        <div class="use-account">
            <p>
                <span>账号</span>
                <span>{{username}}</span>
            </p>
            <p>
                <span>现金额度</span>
                <span>{{usermoney}}</span>
            </p>
        </div>
        <div class="award" @click="qiehuan('1')">
            <i class="iconfont icon-lishiguiji"></i> 最新投注
        </div>
        <div v-if="award=='1'">11</div>
        <div class="award" @click="qiehuan('2')">
            <i class="iconfont icon-lishiguiji"></i> 双面长龙
        </div>
        <div v-if="award=='2'">22</div>
        <div class="award" @click="qiehuan('3')">
            <i class="iconfont icon-lishiguiji"></i> 全部长龙
        </div>
        <div v-if="award=='3'">33</div>
    </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'personal',
  data () {
    return {
        award:"",
    }
  },
  computed:{
      ...mapState(['username','usermoney']),
  },
  methods:{
      qiehuan(index){
          this.award=this.award==index?'':index;
      }
  }
}
</script>

<style lang="scss">
    .use{
        width: 245px;
        padding: 0 5px;
    }
    .use-account{
        p{
            font-size: 14px;
            background-color: #8f8f8f;
            span{
                vertical-align: middle;
                line-height: 30px;
                height: 30px;
                display: inline-block;
                text-align: center;
            }
            span:first-child{
                width: 30%;
                color: #fff;
                font-weight: bold;
            }
            span:last-child{
                width: 65%;
                line-height: 25px;
                height: 25px;
                background: #fff;
                border-radius: 5px;
            }
        }
        p:first-child{
            border-bottom: 1px solid #565656;
        }
    }
    .award{
        padding-left: 20px;
        height: 45px;;
        background-color: #f3f3f3;
        color: #333;
        font-size: 14px;
        font-weight: bold;
        border-top: solid 1px #fff;
        border-bottom: solid 1px #ccc;
        line-height: 40px;
        cursor: pointer;
    }
</style>
